//
//  DFConstants.swift
//  DailyFresh
//
//  Created by Arthur on 2017/9/19.
//  Copyright © 2017年 DailyFresh. All rights reserved.
//

import Foundation

// 颜色
struct DFColorConstants {
    // app主色调
    static let main:UIColor = UIColor.init(hexString: "fc4c91")!
    
    static let gray:UIColor = UIColor.init(hexString: "969696")!
    static let lightGray:UIColor = UIColor.init(hexString: "d1d1d1")!

    static let black:UIColor = UIColor.init(hexString: "474245")!
    static let line:UIColor = UIColor.init(hexString: "e9e9e9")!

}

// 布局
struct DFLayoutConstants {
    static let screenWidth = UIScreen.main.bounds.size.width
    static let screenHeight = UIScreen.main.bounds.size.height
    static let screenScale = UIScreen.main.scale
    static let scale = screenWidth / 375.0
    static let navigationbarHeigth:CGFloat = 44.0
    static let tabBarHeight:CGFloat = 49
    static let statusbarHeight:CGFloat = UIApplication.shared.statusBarFrame.size.height
    static let fullNavigationbarHeight:CGFloat = navigationbarHeigth + statusbarHeight
    static let margin: CGFloat = normalize(value: 15)
    static let contentWidth = screenWidth - 2 * margin
    
}

public func normalize(value: CGFloat) -> CGFloat {
    return  Darwin.floor(DFLayoutConstants.scale * value);
}
